﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Comissoes.Models.PedidosVendaModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <%= ViewData["scripts"] %>
    <script type="text/javascript" src="../../Scripts/cadastros/enderecos.js"></script>
    <!-- Custom JS -->
    <script type="text/javascript" src="../../Scripts/digitacoes/NFe.js"></script>
</head>
<body>
    <div class="cabecalho ui-state-highlight">
        <span class="icoedt" />
        <span class="txt">
            Digitação de Pedido de Venda
        </span>
    </div>
    <% Html.BeginForm(); %>
        <% if (Model.pedido.VENDAS == null)
           { %>
            <%= Html.Hidden("ENPS_RET") %>
            <%= Html.Hidden("ENPS_ENTR") %>
        <% }
           else
           { %>
            <%= Html.Hidden("ENPS_RET", Model.pedido.VENDAS.ENDERECO_RETIRADA.ID_ENPS) %>
            <%= Html.Hidden("ENPS_ENTR", Model.pedido.VENDAS.ENDERECO_ENTREGA.ID_ENPS) %>
        <% } %>
        <div class="pagina">
            <fieldset class="container transparent">
                <button class="diskcommand" type="button" onclick="Gravar()">Gravar</button>
                <button class="checkcommand" type="button" onclick="Validar()">Validar</button>
            </fieldset>
            <fieldset class="container field900 border">
                <% Html.RenderPartial("Cabecalho", Model); %>
                <fieldset class="tabscontainer container clear border">
                    <ul>
                        <li><a href="#Itens"><span>Produtos e Serviços</span></a></li>
                        <li><a href="#Transporte"><span>Transporte</span></a></li>
                        <li><a href="#Pagamentos"><span>Pagamentos</span></a></li>
                        <li><a href="#Complemento"><span>Complemento</span></a></li>
                        <li><a href="#Totais"><span>Totais</span></a></li>
                    </ul>
                    <div id="Itens">
                        <% Html.RenderPartial("Itens"); %>
                        <fieldset class="tabsprodutos container clear border tabs">
                            <ul>
                                <li><a href="/NotasFiscais/ItensICMS"><span>ICMS</span></a></li>
                                <li><a href="/NotasFiscais/ItensIPI"><span>IPI</span></a></li>
                                <li><a href="/NotasFiscais/ItensPIS"><span>PIS</span></a></li>
                                <li><a href="/NotasFiscais/ItensCOFINS"><span>COFINS</span></a></li>
                                <li><a href="/NotasFiscais/ItensISSQN"><span>ISSQN</span></a></li>
                                <li><a href="/NotasFiscais/ItensImportacao"><span>Importação</span></a></li>
                                <li><a href="/NotasFiscais/ItensInfo"><span>Info</span></a></li>
                                <li><a href="/NotasFiscais/Veiculo"><span>Veículo</span></a></li>
                                <li><a href="/NotasFiscais/Medicamento"><span>Medicamento</span></a></li>
                                <li><a href="/NotasFiscais/Armamento"><span>Armamento</span></a></li>
                                <li><a href="/NotasFiscais/Combustivel"><span>Combustível</span></a></li>
                            </ul>
                        </fieldset>
                        <fieldset class="container transparent clear">
                            <label class="floatright insidebutton">
                                <button class="addcommand" type="button" onclick="ItemInsert()">Inserir</button>
                            </label>
                            <label class="floatright insidebutton">
                                <button class="pencilcommand" type="button" disabled="disabled" onclick="ItemEdit()">Alterar</button>
                            </label>
                            <label class="floatright insidebutton">
                                <button class="closecommand" type="button" disabled="disabled" onclick="ItemDelete()">Excluir</button>
                            </label>
                        </fieldset>
                        <fieldset class="tabs nopadding container field800 transparent">
                            <table id="table"></table>
                            <div id="pager"></div>
                        </fieldset>
                    </div>
                    <div id="Transporte">
                        <fieldset class="container tabs transparent">
                            <% Html.RenderPartial("Transporte", Model); %>
                            <fieldset class="tabscontainer container clear border nomargin">
                                <ul>
                                    <li><a href="/NotasFiscais/TransporteICMS"><span>Retenção ICMS</span></a></li>
                                    <li><a href="/NotasFiscais/TransporteVeiculo"><span>Veículo</span></a></li>
                                    <li><a href="/NotasFiscais/TransporteVolumes"><span>Volumes</span></a></li>
                                </ul>
                            </fieldset>
                        </fieldset>
                    </div>
                    <div id="Pagamentos">
                        <fieldset id="Parcelas" class="container field860 tabs transparent">
                            <fieldset class="container field860 transparent">
                                <label for="COD_CDPG" class="for160 clear ui-widget">
                                    <%= Html.Encode("Condição de Pagamento:") %>
                                </label>
                                <label class="select280">
                                
                                </label>
                            </fieldset>
                            <fieldset class="container parcela transparent"></fieldset>
                        </fieldset>
                    </div>
                    <div id="Complemento">
                        <fieldset class="container transparent nopadding">
                            <% Html.RenderPartial("Complemento", Model); %>
                        </fieldset>
                    </div>
                    <div id="Totais">
                        <fieldset class="container transparent nopadding">
                            <% Html.RenderPartial("Totais", Model); %>
                        </fieldset>
                    </div>                        
                </fieldset>
            </fieldset>
        </div>
    <% Html.EndForm(); %>
</body>
</html>